﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using myBoard.Framework.Controls.Navigation;
using Webnet.Controls;

namespace Webnet.BO.ConfigSteps
{
    public class HtmlSourceType : StepBase, IBreadcrumbExplorerEntity
    {
        public HtmlSourceTypeCtrl HtmlSourceTypeCtrl { get; set; }

        public HtmlSourceType()
        {
            HtmlSourceTypeCtrl = new HtmlSourceTypeCtrl();
            HtmlSourceTypeCtrl._saveBt.Click += new System.Windows.RoutedEventHandler(SaveBt_Click);
            HtmlSourceTypeCtrl._cancelBt.Click += new System.Windows.RoutedEventHandler(_cancelBt_Click);
        }

        void _cancelBt_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            RaiseWizardCanceled();
        }

        void SaveBt_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            Settings.Html = HtmlSourceTypeCtrl._htmlCodeTbx.Text;
            RaiseWizardCompleted(Settings);
        }

        #region IBreadcrumbExplorerEntity Members

        public void Dispose()
        {
            
        }

        public System.Windows.FrameworkElement GetControl()
        {
            return HtmlSourceTypeCtrl;
        }

        public event IBreadcrumbExplorerNextEntitySelectedHandler IBreadcrumbExplorerNextEntitySelected;

        public System.Windows.Media.Imaging.BitmapImage Icon { get; set; }

        public string Name { get; set; }

        public void Update(object newValue)
        {
            
        }

        #endregion
    }
}
